########################################################################
import datetime
class Custom():
    """"""

    #----------------------------------------------------------------------
    def __init__(self):
        """Constructor"""
        
    #return list with uniq values only
    def list_uniq(self, seq, idfun=None):
        # order preserving
        if idfun is None:
           def idfun(x): return x
        seen = {}
        result = []
        for item in seq:
            marker = idfun(item)
        
            if marker in seen: continue
            seen[marker] = 1
            result.append(item)
        return result                
        

    # Show current date + time
    def cTime(self):
        curentDate = datetime.datetime.now()
        cdate_ctime = curentDate.strftime("%d.%b.%Y  %H:%M:%S")
        return cdate_ctime # return current date+time
    
    # Show current date + time
    def cDate(self):
        curentDate = datetime.datetime.now()
        cdate_ctime = curentDate.strftime("%d.%b.%Y")
        return cdate_ctime # return current date+time    